﻿using PureMVC.Interfaces;
using PureMVC.Patterns.Command;

namespace CounterApp.PureMVC
{
    public class DecreaseCommand : SimpleCommand
    {
        public const string KEY = "DECREASE_COMMAND";
        public override void Execute(INotification notification)
        {
            var proxy = Facade.RetrieveProxy(CounterAppModelProxy.NAME) as CounterAppModelProxy;

            proxy.DecreaseCount();

            Facade.SendNotification("UPDATE_VIEW",proxy.Count);
        }
    }
}